1. Field of the Invention
The present invention relates to a program logic apparatus capable of inputting and outputting external signals by means of a program.
2. Description of Related Art
Conventionally, a microprocessor serving as a control processor is built in an electronic apparatus of various types and utilized as a built-in control device for controlling the entire apparatus. The microprocessor executes a programmable sequence inside the apparatus.
The microprocessor as stated above has an input/output terminal referred to as a PIO (peripheral input-output). By changing a register and a memory map for controlling the PIO, the microprocessor can input and output digital information from an input/output pin connected to an external device. That is, the microprocessor can capture an external signal state and output a signal and a signal pattern to the external device through the PIO. Further, the PIO can be programmably changed to an input terminal or an output terminal by the control of the microprocessor.
The microprocessor operates based on a clock created for the processor. An event which occurs on the tip of the input/output pin, such as the PIO, to be controlled is, by contrast, not synchronous with the clock of the microprocessor.
However, no mechanism for synchronizing with a standard clock, as a time unit, for determining external logic connected to the input/output pin is prepared for the input/output control of the PIO in the microprocessor. Due to this, control branching for the microprocessor occurs under internal conditions based on the processing result of the microprocessor and cannot be synchronized with the standard clock, with the result that it is difficult to exchange information between the microprocessor and an external logic constitution synchronous with the standard clock through the input/output pin.
Further, while it is possible to reflect the information of the input pin on a program operation by an interrupt, an interrupt jumping function responds asynchronously with the change of an input signal for receiving an interrupt request and then changes a command execution address. Due to this, the interrupt jumping function is asynchronous with the clock and it is difficult to exchange information with the external logical constitution synchronous with the standard clock using interrupt timing.
Moreover, an interrupt is difficult to execute under combined conditions. Even if an interrupt signal can be inputted, it is required to carry out a cause specifying operation after the interrupt occurs, making a program processing complicated to thereby cause delay.